#include <libavformat/avformat.h>

int main(int argc, char const *argv[])
{

    FILE *fp;
    fp = fopen("/home/wzp/h264/b.h264", "w");
    if (fp < 0)
    {
        perror("open file error");
        return 1;
    }

    char *video_buf = av_mallocz(10);
    video_buf[0] = 0x30;
    video_buf[1] = 0x31;
    fwrite(video_buf, 1, 2, fp);
    fclose(fp);

    return 0;
}
